package cn.ren.controller;

import cn.ren.constant.MessageConstant;
import cn.ren.entity.Result;
import cn.ren.pojo.Member;
import cn.ren.service.MemberService;
import com.alibaba.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;

@RequestMapping("/member")
@RestController
public class DJ_MemberController {

    @Reference
    private MemberService memberService;

    @RequestMapping("/add")
    public Result dj_add(@RequestBody Member member,Integer[] setmealIds){
        try {
            return memberService.dj_add(member,setmealIds);
        } catch (Exception e) {
            e.printStackTrace();
            return new Result(false,"预约失败...");
        }
    }
}
